Optimal. Leaf size=224 \[ -\frac {\left (-3 a^2 B+a A b+2 b^2 B\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{b^2 d \left (a^2-b^2\right )}+\frac {a (A b-a B) \sin (c+d x) \sqrt {\cos (c+d x)}}{b d \left (a^2-b^2\right ) (a+b \cos (c+d x))}+\frac {\left (-3 a^3 B+a^2 A b+4 a b^2 B-2 A b^3\right ) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{b^3 d \left (a^2-b^2\right )}-\frac {a \left (-3 a^3 B+a^2 A b+5 a b^2 B-3 A b^3\right ) \Pi \left (\frac {2 b}{a+b};\left .\frac {1}{2} (c+d x)\right |2\right )}{b^3 d (a-b) (a+b)^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.63, antiderivative size = 224, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {2989, 3059, 2639, 3002, 2641, 2805} \[ \frac {\left (a^2 A b-3 a^3 B+4 a b^2 B-2 A b^3\right ) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{b^3 d \left (a^2-b^2\right )}-\frac {\left (-3 a^2 B+a A b+2 b^2 B\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{b^2 d \left (a^2-b^2\right )}-\frac {a \left (a^2 A b-3 a^3 B+5 a b^2 B-3 A b^3\right ) \Pi \left (\frac {2 b}{a+b};\left .\frac {1}{2} (c+d x)\right |2\right )}{b^3 d (a-b) (a+b)^2}+\frac {a (A b-a B) \sin (c+d x) \sqrt {\cos (c+d x)}}{b d \left (a^2-b^2\right ) (a+b \cos (c+d x))} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2639
Rule 2641
Rule 2805
Rule 2989
Rule 3002
Rule 3059
Rubi steps
\begin {align*} \int \frac {\cos ^{\frac {3}{2}}(c+d x) (A+B \cos (c+d x))}{(a+b \cos (c+d x))^2} \, dx &=\frac {a (A b-a B) \sqrt {\cos (c+d x)} \sin (c+d x)}{b \left (a^2-b^2\right ) d (a+b \cos (c+d x))}-\frac {\int \frac {-\frac {1}{2} a (A b-a B)+b (A b-a B) \cos (c+d x)+\frac {1}{2} \left (a A b-3 a^2 B+2 b^2 B\right ) \cos ^2(c+d x)}{\sqrt {\cos (c+d x)} (a+b \cos (c+d x))} \, dx}{b \left (a^2-b^2\right )}\\ &=\frac {a (A b-a B) \sqrt {\cos (c+d x)} \sin (c+d x)}{b \left (a^2-b^2\right ) d (a+b \cos (c+d x))}+\frac {\int \frac {\frac {1}{2} a b (A b-a B)+\frac {1}{2} \left (a^2 A b-2 A b^3-3 a^3 B+4 a b^2 B\right ) \cos (c+d x)}{\sqrt {\cos (c+d x)} (a+b \cos (c+d x))} \, dx}{b^2 \left (a^2-b^2\right )}-\frac {\left (a A b-3 a^2 B+2 b^2 B\right ) \int \sqrt {\cos (c+d x)} \, dx}{2 b^2 \left (a^2-b^2\right )}\\ &=-\frac {\left (a A b-3 a^2 B+2 b^2 B\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{b^2 \left (a^2-b^2\right ) d}+\frac {a (A b-a B) \sqrt {\cos (c+d x)} \sin (c+d x)}{b \left (a^2-b^2\right ) d (a+b \cos (c+d x))}+\frac {\left (a^2 A b-2 A b^3-3 a^3 B+4 a b^2 B\right ) \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx}{2 b^3 \left (a^2-b^2\right )}-\frac {\left (a \left (a^2 A b-3 A b^3-3 a^3 B+5 a b^2 B\right )\right ) \int \frac {1}{\sqrt {\cos (c+d x)} (a+b \cos (c+d x))} \, dx}{2 b^3 \left (a^2-b^2\right )}\\ &=-\frac {\left (a A b-3 a^2 B+2 b^2 B\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{b^2 \left (a^2-b^2\right ) d}+\frac {\left (a^2 A b-2 A b^3-3 a^3 B+4 a b^2 B\right ) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{b^3 \left (a^2-b^2\right ) d}-\frac {a \left (a^2 A b-3 A b^3-3 a^3 B+5 a b^2 B\right ) \Pi \left (\frac {2 b}{a+b};\left .\frac {1}{2} (c+d x)\right |2\right )}{(a-b) b^3 (a+b)^2 d}+\frac {a (A b-a B) \sqrt {\cos (c+d x)} \sin (c+d x)}{b \left (a^2-b^2\right ) d (a+b \cos (c+d x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 2.74, size = 280, normalized size = 1.25 \[ \frac {\frac {\frac {2 \left (a^2 B+a A b-2 b^2 B\right ) \Pi \left (\frac {2 b}{a+b};\left .\frac {1}{2} (c+d x)\right |2\right )}{a+b}+\frac {2 \left (3 a^2 B-a A b-2 b^2 B\right ) \sin (c+d x) \left (\left (b^2-2 a^2\right ) \Pi \left (-\frac {b}{a};\left .\sin ^{-1}\left (\sqrt {\cos (c+d x)}\right )\right |-1\right )+2 a (a+b) F\left (\left .\sin ^{-1}\left (\sqrt {\cos (c+d x)}\right )\right |-1\right )-2 a b E\left (\left .\sin ^{-1}\left (\sqrt {\cos (c+d x)}\right )\right |-1\right )\right )}{a b^2 \sqrt {\sin ^2(c+d x)}}+\frac {8 (a B-A b) \left ((a+b) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )-a \Pi \left (\frac {2 b}{a+b};\left .\frac {1}{2} (c+d x)\right |2\right )\right )}{a+b}}{(a-b) (a+b)}-\frac {4 a (a B-A b) \sin (c+d x) \sqrt {\cos (c+d x)}}{\left (a^2-b^2\right ) (a+b \cos (c+d x))}}{4 b d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (B \cos \left (d x + c\right ) + A\right )} \cos \left (d x + c\right )^{\frac {3}{2}}}{{\left (b \cos \left (d x + c\right ) + a\right )}^{2}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 3.96, size = 849, normalized size = 3.79 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (B \cos \left (d x + c\right ) + A\right )} \cos \left (d x + c\right )^{\frac {3}{2}}}{{\left (b \cos \left (d x + c\right ) + a\right )}^{2}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {{\cos \left (c+d\,x\right )}^{3/2}\,\left (A+B\,\cos \left (c+d\,x\right )\right )}{{\left (a+b\,\cos \left (c+d\,x\right )\right )}^2} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________